package de.dhbw.karlsruhe.picsim.codeimport;

import de.dhbw.karlsruhe.picsim.model.memory.CommandRegisterAddress;
import de.dhbw.karlsruhe.picsim.model.memory.OpCode;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
 * Created by IntelliJ IDEA.
 * User: goesen
 * Date: Apr 9, 2010
 * Time: 12:36:02 PM
 */
final class LSTLineImpl implements LSTLine {
    private final OpCode opCode;
    private final CommandRegisterAddress commandRegisterAddress;
    private final String comment;

    LSTLineImpl(@Nullable final OpCode opCode,
                @Nullable final CommandRegisterAddress address,
                @NotNull final String comment) {
        this.opCode = opCode;
        this.comment = comment;
        commandRegisterAddress = address;
    }

    @Override
    public OpCode getOpCode() {
        return opCode;
    }

    @Override
    public CommandRegisterAddress getCommandRegisterNumber() {
        return commandRegisterAddress;
    }

    @Override
    @NotNull
    public String getComment() {
        return comment;
    }
}
